<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This file documents the use of the GNU compilers.

Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>HPPA Options (Using the GNU Compiler Collection (GCC))</title>

<meta name="description" content="HPPA Options (Using the GNU Compiler Collection (GCC))">
<meta name="keywords" content="HPPA Options (Using the GNU Compiler Collection (GCC))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Indices.html" rel="index" title="Indices">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Submodel-Options.html" rel="up" title="Submodel Options">
<link href="IA_002d64-Options.html" rel="next" title="IA-64 Options">
<link href="H8_002f300-Options.html" rel="prev" title="H8/300 Options">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
kbd.key {font-style: normal}
span:hover a.copiable-link {visibility: visible}
-->
</style>


</head>

<body lang="en_US">
<div class="subsection-level-extent" id="HPPA-Options">
<div class="nav-panel">
<p>
Next: <a href="IA_002d64-Options.html" accesskey="n" rel="next">IA-64 Options</a>, Previous: <a href="H8_002f300-Options.html" accesskey="p" rel="prev">H8/300 Options</a>, Up: <a href="Submodel-Options.html" accesskey="u" rel="up">Machine-Dependent Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="HPPA-Options-1"><span>3.19.19 HPPA Options<a class="copiable-link" href="#HPPA-Options-1"> &para;</a></span></h4>
<a class="index-entry-id" id="index-HPPA-Options"></a>

<p>These &lsquo;<samp class="samp">-m</samp>&rsquo; options are defined for the HPPA family of computers:
</p>
<dl class="table">
<dt><a id="index-march-5"></a><span><code class="code">-march=<var class="var">architecture-type</var></code><a class="copiable-link" href="#index-march-5"> &para;</a></span></dt>
<dd><p>Generate code for the specified architecture.  The choices for
<var class="var">architecture-type</var> are &lsquo;<samp class="samp">1.0</samp>&rsquo; for PA 1.0, &lsquo;<samp class="samp">1.1</samp>&rsquo; for PA
1.1, and &lsquo;<samp class="samp">2.0</samp>&rsquo; for PA 2.0 processors.  Refer to
<samp class="file">/usr/lib/sched.models</samp> on an HP-UX system to determine the proper
architecture option for your machine.  Code compiled for lower numbered
architectures runs on higher numbered architectures, but not the
other way around.
</p>
</dd>
<dt><a class="index-entry-id" id="index-mpa_002drisc_002d1_002d1"></a>
<a class="index-entry-id" id="index-mpa_002drisc_002d2_002d0"></a>
<a id="index-mpa_002drisc_002d1_002d0"></a><span><code class="code">-mpa-risc-1-0</code><a class="copiable-link" href="#index-mpa_002drisc_002d1_002d0"> &para;</a></span></dt>
<dt><code class="code">-mpa-risc-1-1</code></dt>
<dt><code class="code">-mpa-risc-2-0</code></dt>
<dd><p>Synonyms for <samp class="option">-march=1.0</samp>, <samp class="option">-march=1.1</samp>, and <samp class="option">-march=2.0</samp> respectively.
</p>
</dd>
<dt><a class="index-entry-id" id="index-mno_002datomic_002dlibcalls"></a>
<a id="index-matomic_002dlibcalls"></a><span><code class="code">-matomic-libcalls</code><a class="copiable-link" href="#index-matomic_002dlibcalls"> &para;</a></span></dt>
<dd><p>Generate libcalls for atomic loads and stores when sync libcalls are disabled.
This option is enabled by default.  It only affects the generation of
atomic libcalls by the HPPA backend.
</p>
<p>Both the sync and <samp class="file">libatomic</samp> libcall implementations use locking.
As a result, processor stores are not atomic with respect to other
atomic operations.  Processor loads up to DImode are atomic with
respect to other atomic operations provided they are implemented as
a single access.
</p>
<p>The PA-RISC architecture does not support any atomic operations in
hardware except for the <code class="code">ldcw</code> instruction.  Thus, all atomic
support is implemented using sync and atomic libcalls.  Sync libcall
support is in <samp class="file">libgcc.a</samp>.  Atomic libcall support is in
<samp class="file">libatomic</samp>.
</p>
<p>This option generates <code class="code">__atomic_exchange</code> calls for atomic stores.
It also provides special handling for atomic DImode accesses on 32-bit
targets.
</p>
</dd>
<dt><a id="index-mbig_002dswitch"></a><span><code class="code">-mbig-switch</code><a class="copiable-link" href="#index-mbig_002dswitch"> &para;</a></span></dt>
<dd><p>Does nothing.  Preserved for backward compatibility.
</p>
</dd>
<dt><a id="index-mcaller_002dcopies"></a><span><code class="code">-mcaller-copies</code><a class="copiable-link" href="#index-mcaller_002dcopies"> &para;</a></span></dt>
<dd><p>The caller copies function arguments passed by hidden reference.  This
option should be used with care as it is not compatible with the default
32-bit runtime.  However, only aggregates larger than eight bytes are
passed by hidden reference and the option provides better compatibility
with OpenMP.
</p>
</dd>
<dt><a id="index-mcoherent_002dldcw"></a><span><code class="code">-mcoherent-ldcw</code><a class="copiable-link" href="#index-mcoherent_002dldcw"> &para;</a></span></dt>
<dd><p>Use ldcw/ldcd coherent cache-control hint.
</p>
</dd>
<dt><a id="index-mdisable_002dfpregs"></a><span><code class="code">-mdisable-fpregs</code><a class="copiable-link" href="#index-mdisable_002dfpregs"> &para;</a></span></dt>
<dd><p>Disable floating-point registers.  Equivalent to <code class="code">-msoft-float</code>.
</p>
</dd>
<dt><a id="index-mdisable_002dindexing"></a><span><code class="code">-mdisable-indexing</code><a class="copiable-link" href="#index-mdisable_002dindexing"> &para;</a></span></dt>
<dd><p>Prevent the compiler from using indexing address modes.  This avoids some
rather obscure problems when compiling MIG generated code under MACH.
</p>
</dd>
<dt><a id="index-mfast_002dindirect_002dcalls"></a><span><code class="code">-mfast-indirect-calls</code><a class="copiable-link" href="#index-mfast_002dindirect_002dcalls"> &para;</a></span></dt>
<dd><p>Generate code that assumes calls never cross space boundaries.  This
allows GCC to emit code that performs faster indirect calls.
</p>
<p>This option does not work in the presence of shared libraries or nested
functions.
</p>
</dd>
<dt><a id="index-mfixed_002drange"></a><span><code class="code">-mfixed-range=<var class="var">register-range</var></code><a class="copiable-link" href="#index-mfixed_002drange"> &para;</a></span></dt>
<dd><p>Generate code treating the given register range as fixed registers.
A fixed register is one that the register allocator cannot use.  This is
useful when compiling kernel code.  A register range is specified as
two registers separated by a dash.  Multiple register ranges can be
specified separated by a comma.
</p>
</dd>
<dt><a id="index-mgas"></a><span><code class="code">-mgas</code><a class="copiable-link" href="#index-mgas"> &para;</a></span></dt>
<dd><p>Enable the use of assembler directives only GAS understands.
</p>
</dd>
<dt><a id="index-mgnu_002dld"></a><span><code class="code">-mgnu-ld</code><a class="copiable-link" href="#index-mgnu_002dld"> &para;</a></span></dt>
<dd><p>Use options specific to GNU <code class="command">ld</code>.
This passes <samp class="option">-shared</samp> to <code class="command">ld</code> when
building a shared library.  It is the default when GCC is configured,
explicitly or implicitly, with the GNU linker.  This option does not
affect which <code class="command">ld</code> is called; it only changes what parameters
are passed to that <code class="command">ld</code>.
The <code class="command">ld</code> that is called is determined by the
<samp class="option">--with-ld</samp> configure option, GCC&rsquo;s program search path, and
finally by the user&rsquo;s <code class="env">PATH</code>.  The linker used by GCC can be printed
using &lsquo;<samp class="samp">which `gcc -print-prog-name=ld`</samp>&rsquo;.  This option is only available
on the 64-bit HP-UX GCC, i.e. configured with &lsquo;<samp class="samp">hppa*64*-*-hpux*</samp>&rsquo;.
</p>
</dd>
<dt><a id="index-mhp_002dld"></a><span><code class="code">-mhp-ld</code><a class="copiable-link" href="#index-mhp_002dld"> &para;</a></span></dt>
<dd><p>Use options specific to HP <code class="command">ld</code>.
This passes <samp class="option">-b</samp> to <code class="command">ld</code> when building
a shared library and passes <samp class="option">+Accept TypeMismatch</samp> to <code class="command">ld</code> on all
links.  It is the default when GCC is configured, explicitly or
implicitly, with the HP linker.  This option does not affect
which <code class="command">ld</code> is called; it only changes what parameters are passed to that
<code class="command">ld</code>.
The <code class="command">ld</code> that is called is determined by the <samp class="option">--with-ld</samp>
configure option, GCC&rsquo;s program search path, and finally by the user&rsquo;s
<code class="env">PATH</code>.  The linker used by GCC can be printed using &lsquo;<samp class="samp">which
`gcc -print-prog-name=ld`</samp>&rsquo;.  This option is only available on the 64-bit
HP-UX GCC, i.e. configured with &lsquo;<samp class="samp">hppa*64*-*-hpux*</samp>&rsquo;.
</p>
</dd>
<dt><a id="index-mlinker_002dopt"></a><span><code class="code">-mlinker-opt</code><a class="copiable-link" href="#index-mlinker_002dopt"> &para;</a></span></dt>
<dd><p>Enable the optimization pass in the HP-UX linker.  Note this makes symbolic
debugging impossible.  It also triggers a bug in the HP-UX 8 and HP-UX 9
linkers in which they give bogus error messages when linking some programs.
</p>
</dd>
<dt><a class="index-entry-id" id="index-mlong_002dcalls-5"></a>
<a id="index-mno_002dlong_002dcalls-2"></a><span><code class="code">-mlong-calls</code><a class="copiable-link" href="#index-mno_002dlong_002dcalls-2"> &para;</a></span></dt>
<dd><p>Generate code that uses long call sequences.  This ensures that a call
is always able to reach linker generated stubs.  The default is to generate
long calls only when the distance from the call site to the beginning
of the function or translation unit, as the case may be, exceeds a
predefined limit set by the branch type being used.  The limits for
normal calls are 7,600,000 and 240,000 bytes, respectively for the
PA 2.0 and PA 1.X architectures.  Sibcalls are always limited at
240,000 bytes.
</p>
<p>Distances are measured from the beginning of functions when using the
<samp class="option">-ffunction-sections</samp> option, or when using the <samp class="option">-mgas</samp>
and <samp class="option">-mno-portable-runtime</samp> options together under HP-UX with
the SOM linker.
</p>
<p>It is normally not desirable to use this option as it degrades
performance.  However, it may be useful in large applications,
particularly when partial linking is used to build the application.
</p>
<p>The types of long calls used depends on the capabilities of the
assembler and linker, and the type of code being generated.  The
impact on systems that support long absolute calls, and long pic
symbol-difference or pc-relative calls should be relatively small.
However, an indirect call is used on 32-bit ELF systems in pic code
and it is quite long.
</p>
</dd>
<dt><a id="index-mlong_002dload_002dstore"></a><span><code class="code">-mlong-load-store</code><a class="copiable-link" href="#index-mlong_002dload_002dstore"> &para;</a></span></dt>
<dd><p>Generate 3-instruction load and store sequences as sometimes required by
the HP-UX 10 linker.  This is equivalent to the &lsquo;<samp class="samp">+k</samp>&rsquo; option to
the HP compilers.
</p>
</dd>
<dt><a id="index-mjump_002din_002ddelay"></a><span><code class="code">-mjump-in-delay</code><a class="copiable-link" href="#index-mjump_002din_002ddelay"> &para;</a></span></dt>
<dd><p>This option is ignored and provided for compatibility purposes only.
</p>
</dd>
<dt><a class="index-entry-id" id="index-mspace_002dregs"></a>
<a id="index-mno_002dspace_002dregs"></a><span><code class="code">-mno-space-regs</code><a class="copiable-link" href="#index-mno_002dspace_002dregs"> &para;</a></span></dt>
<dd><p>Generate code that assumes the target has no space registers.  This allows
GCC to generate faster indirect calls and use unscaled index address modes.
</p>
<p>Such code is suitable for level 0 PA systems and kernels.
</p>
</dd>
<dt><a id="index-mordered"></a><span><code class="code">-mordered</code><a class="copiable-link" href="#index-mordered"> &para;</a></span></dt>
<dd><p>Assume memory references are ordered and barriers are not needed.
</p>
</dd>
<dt><a id="index-mportable_002druntime"></a><span><code class="code">-mportable-runtime</code><a class="copiable-link" href="#index-mportable_002druntime"> &para;</a></span></dt>
<dd><p>Use the portable calling conventions proposed by HP for ELF systems.
</p>
</dd>
<dt><a id="index-mschedule"></a><span><code class="code">-mschedule=<var class="var">cpu-type</var></code><a class="copiable-link" href="#index-mschedule"> &para;</a></span></dt>
<dd><p>Schedule code according to the constraints for the machine type
<var class="var">cpu-type</var>.  The choices for <var class="var">cpu-type</var> are &lsquo;<samp class="samp">700</samp>&rsquo;
&lsquo;<samp class="samp">7100</samp>&rsquo;, &lsquo;<samp class="samp">7100LC</samp>&rsquo;, &lsquo;<samp class="samp">7200</samp>&rsquo;, &lsquo;<samp class="samp">7300</samp>&rsquo; and &lsquo;<samp class="samp">8000</samp>&rsquo;.  Refer
to <samp class="file">/usr/lib/sched.models</samp> on an HP-UX system to determine the
proper scheduling option for your machine.  The default scheduling is
&lsquo;<samp class="samp">8000</samp>&rsquo;.
</p>
</dd>
<dt><a id="index-msio"></a><span><code class="code">-msio</code><a class="copiable-link" href="#index-msio"> &para;</a></span></dt>
<dd><p>Generate the predefine, <code class="code">_SIO</code>, for server IO.  The default is
<samp class="option">-mwsio</samp>.  This generates the predefines, <code class="code">__hp9000s700</code>,
<code class="code">__hp9000s700__</code> and <code class="code">_WSIO</code>, for workstation IO.  These
options are available under HP-UX and HI-UX.
</p>
</dd>
<dt><a id="index-msoft_002dfloat-4"></a><span><code class="code">-msoft-float</code><a class="copiable-link" href="#index-msoft_002dfloat-4"> &para;</a></span></dt>
<dd><p>Generate output containing library calls for floating point.
<strong class="strong">Warning:</strong> the requisite libraries are not available for all HPPA
targets.  Normally the facilities of the machine&rsquo;s usual C compiler are
used, but this cannot be done directly in cross-compilation.  You must make
your own arrangements to provide suitable library functions for
cross-compilation.
</p>
<p><samp class="option">-msoft-float</samp> changes the calling convention in the output file;
therefore, it is only useful if you compile <em class="emph">all</em> of a program with
this option.  In particular, you need to compile <samp class="file">libgcc.a</samp>, the
library that comes with GCC, with <samp class="option">-msoft-float</samp> in order for
this to work.
</p>
</dd>
<dt><a id="index-msoft_002dmult"></a><span><code class="code">-msoft-mult</code><a class="copiable-link" href="#index-msoft_002dmult"> &para;</a></span></dt>
<dd><p>Use software integer multiplication.
</p>
<p>This disables the use of the <code class="code">xmpyu</code> instruction.
</p>
</dd>
<dt><a id="index-march-6"></a><span><code class="code">-munix=<var class="var">unix-std</var></code><a class="copiable-link" href="#index-march-6"> &para;</a></span></dt>
<dd><p>Generate compiler predefines and select a startfile for the specified
UNIX standard.  The choices for <var class="var">unix-std</var> are &lsquo;<samp class="samp">93</samp>&rsquo;, &lsquo;<samp class="samp">95</samp>&rsquo;
and &lsquo;<samp class="samp">98</samp>&rsquo;.  &lsquo;<samp class="samp">93</samp>&rsquo; is supported on all HP-UX versions.  &lsquo;<samp class="samp">95</samp>&rsquo;
is available on HP-UX 10.10 and later.  &lsquo;<samp class="samp">98</samp>&rsquo; is available on HP-UX
11.11 and later.  The default values are &lsquo;<samp class="samp">93</samp>&rsquo; for HP-UX 10.00,
&lsquo;<samp class="samp">95</samp>&rsquo; for HP-UX 10.10 though to 11.00, and &lsquo;<samp class="samp">98</samp>&rsquo; for HP-UX 11.11
and later.
</p>
<p><samp class="option">-munix=93</samp> provides the same predefines as GCC 3.3 and 3.4.
<samp class="option">-munix=95</samp> provides additional predefines for <code class="code">XOPEN_UNIX</code>
and <code class="code">_XOPEN_SOURCE_EXTENDED</code>, and the startfile <samp class="file">unix95.o</samp>.
<samp class="option">-munix=98</samp> provides additional predefines for <code class="code">_XOPEN_UNIX</code>,
<code class="code">_XOPEN_SOURCE_EXTENDED</code>, <code class="code">_INCLUDE__STDC_A1_SOURCE</code> and
<code class="code">_INCLUDE_XOPEN_SOURCE_500</code>, and the startfile <samp class="file">unix98.o</samp>.
</p>
<p>It is <em class="emph">important</em> to note that this option changes the interfaces
for various library routines.  It also affects the operational behavior
of the C library.  Thus, <em class="emph">extreme</em> care is needed in using this
option.
</p>
<p>Library code that is intended to operate with more than one UNIX
standard must test, set and restore the variable <code class="code">__xpg4_extended_mask</code>
as appropriate.  Most GNU software doesn&rsquo;t provide this capability.
</p>
</dd>
<dt><a id="index-nolibdld"></a><span><code class="code">-nolibdld</code><a class="copiable-link" href="#index-nolibdld"> &para;</a></span></dt>
<dd><p>Suppress the generation of link options to search libdld.sl when the
<samp class="option">-static</samp> option is specified on HP-UX 10 and later.
</p>
</dd>
<dt><a id="index-static-2"></a><span><code class="code">-static</code><a class="copiable-link" href="#index-static-2"> &para;</a></span></dt>
<dd><p>The HP-UX implementation of setlocale in libc has a dependency on
libdld.sl.  There isn&rsquo;t an archive version of libdld.sl.  Thus,
when the <samp class="option">-static</samp> option is specified, special link options
are needed to resolve this dependency.
</p>
<p>On HP-UX 10 and later, the GCC driver adds the necessary options to
link with libdld.sl when the <samp class="option">-static</samp> option is specified.
This causes the resulting binary to be dynamic.  On the 64-bit port,
the linkers generate dynamic binaries by default in any case.  The
<samp class="option">-nolibdld</samp> option can be used to prevent the GCC driver from
adding these link options.
</p>
</dd>
<dt><a id="index-threads"></a><span><code class="code">-threads</code><a class="copiable-link" href="#index-threads"> &para;</a></span></dt>
<dd><p>Add support for multithreading with the <em class="dfn">dce thread</em> library
under HP-UX.  This option sets flags for both the preprocessor and
linker.
</p></dd>
</dl>

</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="IA_002d64-Options.html">IA-64 Options</a>, Previous: <a href="H8_002f300-Options.html">H8/300 Options</a>, Up: <a href="Submodel-Options.html">Machine-Dependent Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
